namespace Geny.TypeWrapper.Observable{
  using System.Linq;
  public static class ObservableExtensions{
    
	public static System.IObservable<TResult> FromPropertyChanged<T, TResult>( T target, System.String propertyName ) {
      var des = System.ComponentModel.TypeDescriptor.GetProperties( target )
        .OfType<System.ComponentModel.PropertyDescriptor>()
        .Where( p => p.Name == propertyName ).First( );

      return System.Linq.Observable.Create<TResult>( o => {
        var eh = new System.EventHandler( ( s, e ) => o.OnNext( ( TResult )des.GetValue( target ) ) );
        des.AddValueChanged( target, eh );
        return ( ) => des.RemoveValueChanged( target, eh );
      } );
    }

  }
}
 

namespace System.Windows.Observable{
  using Geny.TypeWrapper.Observable;
  public static class FrameworkElementObservableWrapper{

  
    public static System.IObservable<System.Windows.Style> StyleAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Style>( input, "Style" );
    }
  
    public static System.IObservable<System.Boolean> OverridesDefaultStyleAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Boolean>(input, OverridesDefaultStyle);
    }
  
    public static System.IObservable<System.Boolean> UseLayoutRoundingAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Boolean>(input, UseLayoutRounding);
    }
  
    public static System.IObservable<System.Windows.TriggerCollection> TriggersAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.TriggerCollection>(input, Triggers);
    }
  
    public static System.IObservable<System.Windows.DependencyObject> TemplatedParentAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.DependencyObject>(input, TemplatedParent);
    }
  
    public static System.IObservable<System.Windows.ResourceDictionary> ResourcesAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.ResourceDictionary>(input, Resources);
    }
  
    public static System.IObservable<System.Object> DataContextAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Object>(input, DataContext);
    }
  
    public static System.IObservable<System.Windows.Data.BindingGroup> BindingGroupAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Data.BindingGroup>(input, BindingGroup);
    }
  
    public static System.IObservable<System.Windows.Markup.XmlLanguage> LanguageAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Markup.XmlLanguage>(input, Language);
    }
  
    public static System.IObservable<System.String> NameAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.String>(input, Name);
    }
  
    public static System.IObservable<System.Object> TagAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Object>(input, Tag);
    }
  
    public static System.IObservable<System.Windows.Input.InputScope> InputScopeAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Input.InputScope>(input, InputScope);
    }
  
    public static System.IObservable<System.Double> ActualWidthAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Double>(input, ActualWidth);
    }
  
    public static System.IObservable<System.Double> ActualHeightAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Double>(input, ActualHeight);
    }
  
    public static System.IObservable<System.Windows.Media.Transform> LayoutTransformAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Media.Transform>(input, LayoutTransform);
    }
  
    public static System.IObservable<System.Double> WidthAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Double>(input, Width);
    }
  
    public static System.IObservable<System.Double> MinWidthAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Double>(input, MinWidth);
    }
  
    public static System.IObservable<System.Double> MaxWidthAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Double>(input, MaxWidth);
    }
  
    public static System.IObservable<System.Double> HeightAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Double>(input, Height);
    }
  
    public static System.IObservable<System.Double> MinHeightAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Double>(input, MinHeight);
    }
  
    public static System.IObservable<System.Double> MaxHeightAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Double>(input, MaxHeight);
    }
  
    public static System.IObservable<System.Windows.FlowDirection> FlowDirectionAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.FlowDirection>(input, FlowDirection);
    }
  
    public static System.IObservable<System.Windows.Thickness> MarginAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Thickness>(input, Margin);
    }
  
    public static System.IObservable<System.Windows.HorizontalAlignment> HorizontalAlignmentAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.HorizontalAlignment>(input, HorizontalAlignment);
    }
  
    public static System.IObservable<System.Windows.VerticalAlignment> VerticalAlignmentAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.VerticalAlignment>(input, VerticalAlignment);
    }
  
    public static System.IObservable<System.Windows.Style> FocusVisualStyleAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Style>(input, FocusVisualStyle);
    }
  
    public static System.IObservable<System.Windows.Input.Cursor> CursorAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Input.Cursor>(input, Cursor);
    }
  
    public static System.IObservable<System.Boolean> ForceCursorAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Boolean>(input, ForceCursor);
    }
  
    public static System.IObservable<System.Boolean> IsInitializedAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Boolean>(input, IsInitialized);
    }
  
    public static System.IObservable<System.Boolean> IsLoadedAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Boolean>(input, IsLoaded);
    }
  
    public static System.IObservable<System.Object> ToolTipAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Object>(input, ToolTip);
    }
  
    public static System.IObservable<System.Windows.Controls.ContextMenu> ContextMenuAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.Controls.ContextMenu>(input, ContextMenu);
    }
  
    public static System.IObservable<System.Windows.DependencyObject> ParentAsObservable( this System.Windows.FrameworkElement input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.FrameworkElement, System.Windows.DependencyObject>(input, Parent);
    }

    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.RequestBringIntoViewEventArgs>> RequestBringIntoViewAsObservable( this System.Windows.FrameworkElement input){
      return System.Linq.Observable.FromEvent<System.Windows.RequestBringIntoViewEventHandler,System.Windows.RequestBringIntoViewEventArgs>(eh=> new System.Windows.RequestBringIntoViewEventHandler(eh),handler=> input.RequestBringIntoView += handler, handler=> input.RequestBringIntoView -= handler);
    }
    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.SizeChangedEventArgs>> SizeChangedAsObservable( this System.Windows.FrameworkElement input){
      return System.Linq.Observable.FromEvent<System.Windows.SizeChangedEventHandler,System.Windows.SizeChangedEventArgs>(eh=> new System.Windows.SizeChangedEventHandler(eh),handler=> input.SizeChanged += handler, handler=> input.SizeChanged -= handler);
    }
    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.RoutedEventArgs>> LoadedAsObservable( this System.Windows.FrameworkElement input){
      return System.Linq.Observable.FromEvent<System.Windows.RoutedEventHandler,System.Windows.RoutedEventArgs>(eh=> new System.Windows.RoutedEventHandler(eh),handler=> input.Loaded += handler, handler=> input.Loaded -= handler);
    }
    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.RoutedEventArgs>> UnloadedAsObservable( this System.Windows.FrameworkElement input){
      return System.Linq.Observable.FromEvent<System.Windows.RoutedEventHandler,System.Windows.RoutedEventArgs>(eh=> new System.Windows.RoutedEventHandler(eh),handler=> input.Unloaded += handler, handler=> input.Unloaded -= handler);
    }
    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.Controls.ToolTipEventArgs>> ToolTipOpeningAsObservable( this System.Windows.FrameworkElement input){
      return System.Linq.Observable.FromEvent<System.Windows.Controls.ToolTipEventHandler,System.Windows.Controls.ToolTipEventArgs>(eh=> new System.Windows.Controls.ToolTipEventHandler(eh),handler=> input.ToolTipOpening += handler, handler=> input.ToolTipOpening -= handler);
    }
    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.Controls.ToolTipEventArgs>> ToolTipClosingAsObservable( this System.Windows.FrameworkElement input){
      return System.Linq.Observable.FromEvent<System.Windows.Controls.ToolTipEventHandler,System.Windows.Controls.ToolTipEventArgs>(eh=> new System.Windows.Controls.ToolTipEventHandler(eh),handler=> input.ToolTipClosing += handler, handler=> input.ToolTipClosing -= handler);
    }
    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.Controls.ContextMenuEventArgs>> ContextMenuOpeningAsObservable( this System.Windows.FrameworkElement input){
      return System.Linq.Observable.FromEvent<System.Windows.Controls.ContextMenuEventHandler,System.Windows.Controls.ContextMenuEventArgs>(eh=> new System.Windows.Controls.ContextMenuEventHandler(eh),handler=> input.ContextMenuOpening += handler, handler=> input.ContextMenuOpening -= handler);
    }
    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.Controls.ContextMenuEventArgs>> ContextMenuClosingAsObservable( this System.Windows.FrameworkElement input){
      return System.Linq.Observable.FromEvent<System.Windows.Controls.ContextMenuEventHandler,System.Windows.Controls.ContextMenuEventArgs>(eh=> new System.Windows.Controls.ContextMenuEventHandler(eh),handler=> input.ContextMenuClosing += handler, handler=> input.ContextMenuClosing -= handler);
    }
 
  }
}

namespace System.Windows.Controls.Observable{
  public static class ControlObservableWrapper{

  
    public static System.IObservable<System.Windows.Media.Brush> BorderBrushAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.Media.Brush>(input, BorderBrush);
    }
  
    public static System.IObservable<System.Windows.Thickness> BorderThicknessAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.Thickness>(input, BorderThickness);
    }
  
    public static System.IObservable<System.Windows.Media.Brush> BackgroundAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.Media.Brush>(input, Background);
    }
  
    public static System.IObservable<System.Windows.Media.Brush> ForegroundAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.Media.Brush>(input, Foreground);
    }
  
    public static System.IObservable<System.Windows.Media.FontFamily> FontFamilyAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.Media.FontFamily>(input, FontFamily);
    }
  
    public static System.IObservable<System.Double> FontSizeAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Double>(input, FontSize);
    }
  
    public static System.IObservable<System.Windows.FontStretch> FontStretchAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.FontStretch>(input, FontStretch);
    }
  
    public static System.IObservable<System.Windows.FontStyle> FontStyleAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.FontStyle>(input, FontStyle);
    }
  
    public static System.IObservable<System.Windows.FontWeight> FontWeightAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.FontWeight>(input, FontWeight);
    }
  
    public static System.IObservable<System.Windows.HorizontalAlignment> HorizontalContentAlignmentAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.HorizontalAlignment>(input, HorizontalContentAlignment);
    }
  
    public static System.IObservable<System.Windows.VerticalAlignment> VerticalContentAlignmentAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.VerticalAlignment>(input, VerticalContentAlignment);
    }
  
    public static System.IObservable<System.Int32> TabIndexAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Int32>(input, TabIndex);
    }
  
    public static System.IObservable<System.Boolean> IsTabStopAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Boolean>(input, IsTabStop);
    }
  
    public static System.IObservable<System.Windows.Thickness> PaddingAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.Thickness>(input, Padding);
    }
  
    public static System.IObservable<System.Windows.Controls.ControlTemplate> TemplateAsObservable( this System.Windows.Controls.Control input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Control, System.Windows.Controls.ControlTemplate>(input, Template);
    }

    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.Input.MouseButtonEventArgs>> PreviewMouseDoubleClickAsObservable( this System.Windows.Controls.Control input){
      return System.Linq.Observable.FromEvent<System.Windows.Input.MouseButtonEventHandler,System.Windows.Input.MouseButtonEventArgs>(eh=> new System.Windows.Input.MouseButtonEventHandler(eh),handler=> input.PreviewMouseDoubleClick += handler, handler=> input.PreviewMouseDoubleClick -= handler);
    }
    public static System.IObservable<System.Collections.Generic.IEvent<System.Windows.Input.MouseButtonEventArgs>> MouseDoubleClickAsObservable( this System.Windows.Controls.Control input){
      return System.Linq.Observable.FromEvent<System.Windows.Input.MouseButtonEventHandler,System.Windows.Input.MouseButtonEventArgs>(eh=> new System.Windows.Input.MouseButtonEventHandler(eh),handler=> input.MouseDoubleClick += handler, handler=> input.MouseDoubleClick -= handler);
    }
 
  }
}

namespace System.Windows.Controls.Observable{
  public static class ButtonObservableWrapper{

  
    public static System.IObservable<System.Boolean> IsDefaultAsObservable( this System.Windows.Controls.Button input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Button, System.Boolean>(input, IsDefault);
    }
  
    public static System.IObservable<System.Boolean> IsCancelAsObservable( this System.Windows.Controls.Button input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Button, System.Boolean>(input, IsCancel);
    }
  
    public static System.IObservable<System.Boolean> IsDefaultedAsObservable( this System.Windows.Controls.Button input){
      return ObservableExtensions.FromPropertyChanged<System.Windows.Controls.Button, System.Boolean>(input, IsDefaulted);
    }

 
  }
}

namespace Geny.Sample.Observable{
  public static class ProgramBaseObservableWrapper{


 
  }
}

namespace Geny.Sample.Observable{
  public static class ProgramObservableWrapper{


 
  }
}

